package cn.jboa.service.impl;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import cn.jboa.dao.IGradeDAO;
import cn.jboa.entity.Grade;
import cn.jboa.service.IGradeService;
@Service
public class GradeServiceImpl implements IGradeService{
	@Resource
    private IGradeDAO dao;
	@Override
	public List<Grade> findAll() {
		
		return dao.findAll();
	}
	@Override
	public int save(Grade grade) {
		return dao.save(grade);
	}
	@Override
	public int update(Grade grade) {
		return dao.update(grade);
	}
	@Override
	public Grade findId(int id) {
		Grade grade = dao.findID(id).get(0);
		return grade;
	}
	@Override
	public int delete(int id) {
		return dao.delete(id);
	}

}
